package com.qezhhnjy.mall.coupon.feign;

import com.qezhhnjy.mall.common.entity.order.Order;
import com.qezhhnjy.mall.common.http.BaseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("mall-order")
@RequestMapping("/mall-order/order")
public interface OrderFeign {

    /**
     * open feign中GET请求的参数必须加上@ReqeustParam，否则被调用方会出现Request method 'POST' not supported的错误
     */
    @GetMapping("/get")
    BaseResult<Order> get(@RequestParam("id") Long id);

}
